package com.leapp.sk.ui.fragment.task

import android.os.Bundle
import android.support.v4.widget.SwipeRefreshLayout
import com.example.mvp.binder.BaseDataBinder
import com.example.mvp.fragment.BaseFragmentMVP
import com.leapp.sk.bean.ParentingTaskEntity
import com.leapp.sk.binder.BaseBinder
import com.leapp.sk.viewdelegate.task.AllParentingTaskDelegate

/**
 * 我布置的作业
 * @author  chaohaipeng  on 2018/8/10.
 */
class MyParentingTaskFragment : BaseFragmentMVP<AllParentingTaskDelegate>(), SwipeRefreshLayout.OnRefreshListener{
    override fun onRefresh() {
        viewDelegate.stopSwipRefresh()
    }

    override fun initView(p0: Bundle?) {

    }

    override fun initData() {
        val mutableListOf = mutableListOf<ParentingTaskEntity>()
        val parentingTaskEntity1 = ParentingTaskEntity()
        parentingTaskEntity1.type=1
        mutableListOf.add(parentingTaskEntity1)
        viewDelegate.initAdapter(activity, mutableListOf, this)
    }

    override fun bindEvenListener() {
    }

    override fun getDelegateClass(): Class<AllParentingTaskDelegate> {
        return AllParentingTaskDelegate::class.java
    }

    override fun getDataBinder(): BaseDataBinder<*, *> {
        return BaseBinder()
    }
}